package process;

import static org.junit.Assert.*;
import inferenceEngine.labels.Label;

import java.util.ArrayList;
import java.util.Collection;

import org.junit.Test;

import common.Laptop;

public class TestProcessManager {

	@Test
	public void test() {
		ProcessManager ps;
		try {
			ps = new ProcessManager();
			ArrayList<Label> initialLabels = new ArrayList<Label>();
//			initialLabels.add( new Label( "ultraportable" ) );
			initialLabels.add( new Label( "detailed games" ) );
			Collection<Laptop> laptops = ps.process( initialLabels, 0,1000000 );
			ArrayList<Label> labels1 = ps.getRequiredLabels();
			for( Label label : labels1 ){
				System.out.println( label );
			}
			
			ArrayList<Label> labels2 = ps.getRecommendedLabels();
			for( Label label : labels2 ){
				System.out.println( label );
			}
			
			for( Laptop laptop : laptops ){
				System.out.println( );
				System.out.println( laptop.getName() );
				System.out.println( laptop.getRecommendMark() );
				ArrayList<String> labels = laptop.getFuzzyLogicProcess();
				for( String label : labels ){
					System.out.println( label );
				}
			}
//			ps.tooHeavy( laptops.iterator().next() );
//			ps.tooThick( laptops.iterator().next() ); 
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		
	}

}
